<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>一朵 - 代金券</title>
  <!-- swiper-2.7css -->
    <link rel="stylesheet" href="__STATIC__/index/js/swiper/idangerous.swiper.css">
  <!-- swiper-2.7js -->
    <script src="__STATIC__/index/js/swiper/idangerous.swiper.min.js"></script>
  <!-- jquery-3.2.1引用 -->
    <script src="__STATIC__/index/js/global/jquery-3.2.1.min.js"></script>
  <!-- 阿里巴巴矢量图库 -->
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_561814_z72ky81kih08uxr.css">
  <!-- 公共头部 脚部 -->
    <link rel="stylesheet" href="__STATIC__/index/css/global/global.css">
  <!-- 超过1200屏幕 -->
    <link rel="stylesheet" media="screen and (min-width: 1200px)" href="__STATIC__/index/css/coupon/coupon1200.css" />
  <!-- 1080-1200 -->
    <link rel="stylesheet" media="screen  and (min-width: 1080px) and (max-width: 1199px) " href="__STATIC__/index/css/coupon/coupon1080.css"
    />
  <!-- 960-1080 -->
    <link rel="stylesheet" media="screen  and (min-width: 960px) and (max-width: 1079px) " href="__STATIC__/index/css/coupon/coupon960.css"
    />
  <!-- 768-959 -->
    <link rel="stylesheet" media="screen  and (min-width: 768px) and (max-width: 959px) " href="__STATIC__/index/css/coupon/coupon768.css"
    />
  <!-- 568-767 -->
    <link rel="stylesheet" media="screen  and (min-width: 568px) and (max-width: 767px) " href="__STATIC__/index/css/coupon/coupon568.css"
    />
  <!-- 375-567 -->
    <link rel="stylesheet" media="screen  and (min-width: 375px) and (max-width: 567px) " href="__STATIC__/index/css/coupon/coupon375.css"
    />
  <!-- 小于375-->
    <link rel="stylesheet" media="screen  and (max-width: 374px) " href="__STATIC__/index/css/coupon/coupon320.css" />
</head>

<body>

    <div class="M">
        <div class="m-header">
            <div>
                <span onclick="go_back();">
                    <span class="iconfont icon-xiangzuo" ></span>
                    返回
                </span>
                <span>代金券</span>
                <span>
                    {if condition="!empty($realname)"}
                        <a href="{:url('User/index')}" class="my" >
                            {$realname}
                        </a>
                    {else /}
                        <a href="{:url('Login/loginin')}">登录</a>
                        <a href="{:url('Login/register')}">注册</a>
                    {/if}
                    <a href="{:url('MyCart/my_cart')}" class="car">
                        <span class="iconfont icon-gouwuche"></span>
                        <span>{$cart_num}</span>
                    </a>
                </span>
            </div>
        </div>
        <div class="m-details" style="background-image: url('{$coupon.m_beijing}') ;">
            <p>
                <span>立减{$coupon.value}</span>
                <span>[代金券]</span>
            </p>
            <p>此券可以立减订单金额{$coupon.value}元</p>
            <p>此券购买后不可退换</p>
            <p>购买后请在活动期间使用</p>
            <p>虚拟代金券，下单即可使用</p>
        </div>
        <div class="m-rule">
            <p>使用规则</p>
            <p>1、此券可以与优惠券叠加</p>
            <p>
                2、此券有效期：{$coupon.use_start_time|date="Y.m.d",###}-{$coupon.use_end_time|date="Y.m.d",###}
            </p>
            <p>
                3、每个用户限购一张

            </p>
            <p>4、购买此代金券不获得积分</p>
            <p>5、一朵拥有对此券的最终解释权</p>
            {if condition="$is_mobile eq 1"}
            <a href="tel:{$store.mobile}" class="m-service">联系客服</a>
            {else /}
            <a href="{:url('Index/index')}" class="m-service">联系客服</a>
            {/if}
            <a href="{:url('GoodsList/create_cash_coupon_order')}?id={$coupon.id}" class="m-money">¥{$coupon.price} 购买</a>
        </div>

    </div>
    <!------------------------ PC ------------------------>

    <div class="PC">
        <!-- 公共头部 -->
        {include file="public/p_header" /}
        <!-- 公共头部结束 -->
        <div class="pc-headline">
            <span>
                <a href="{:url('Index/index')}">HOME</a>/
                <a href="{:url('GoodsList/goods_list')}?cate_id={$category.0.id}">分类</a>/
                <a href="{:url('GoodsList/cash_coupon_detail')}?id={$coupon.id}">详情</a>
            </span>
            <span class="pc-fenlei-bottom-right">
                <input type="text" name="key" placeholder="点击搜索艺术美食 ">
                <span class="iconfont icon-sousuo" onclick="search();"></span>
            </span>
        </div>
        <div class="pc-details" style="background: url('{$coupon.pc_beijing}') no-repeat 100%;">
            <p>
                <span>立减{$coupon.value}</span>
                <span>[代金券]</span>
            </p>
            <p>此券可以立减订单金额{$coupon.value}元</p>
            <p>此券购买后不可退换</p>
            <p>购买后请在活动期间使用</p>
            <p>虚拟代金券，下单即可使用</p>
        </div>
        <div class="pc-rule">
            <div>
                <p>使用规则</p>
                <p>1、此券可以与优惠券叠加</p>
                <p>
                    2、此券有效期：{$coupon.use_start_time|date="Y.m.d",###}-{$coupon.use_end_time|date="Y.m.d",###}
                </p>
                <p>
                    3、每个用户限购一张

                </p>
                <p>4、购买此代金券不获得积分</p>
                <p>5、一朵拥有对此券的最终解释权</p>
            </div>
            <a href="{:url('GoodsList/create_cash_coupon_order')}?id={$coupon.id}">立即购买</a>
        </div>
        <!-- 公共脚部  -->
        {include file="public/p_footer" /}
        <!-- 公共脚部 结束 -->
    </div>
    <script>
        /**
         * PC搜索艺术美食
         */
        function search(){
            var key = $('input[name=key]').val();
            window.location.href = "{:url('Index/search')}?key="+key;
        }

        /**
         * 移动端搜索
         */
        function m_search(){
            var m_key = $('input[name=m_key]').val();
            window.location.href = "{:url('Index/search')}?key="+m_key;
        }

        /**
         * 返回上一页
         */
        function go_back(){
            window.history.back();  //返回上一页
        }
    </script>
</body>

</html>